/*
 * Copyright (c) 2018-2999 九五云信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

package com.yami.shop.platform.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yami.shop.bean.dto.PageAnalysisDto;
import com.yami.shop.bean.param.FlowAnalysisParam;
import com.yami.shop.common.util.PageParam;
import com.yami.shop.service.FlowPageAnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author lgh on 2018/11/26.
 */
@RestController
@RequestMapping("/platform/flowPageAnalysis")
public class FlowPageAnalysisController {

    @Autowired
    private FlowPageAnalysisService flowPageAnalysisService;


    /**
     * 分页获取页面统计数据
     */
    @GetMapping("/page")
    public ResponseEntity<IPage<PageAnalysisDto>> page(PageParam<PageAnalysisDto> page, FlowAnalysisParam flowAnalysisParam) {
        IPage<PageAnalysisDto> flowPageAnalysisParamIPage = flowPageAnalysisService.getPageOrProdAnalysis(page, flowAnalysisParam);
        return ResponseEntity.ok(flowPageAnalysisParamIPage);
    }
}
